package com.market.manager;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.market.domain.Location;
import com.market.domain.Message;
import com.market.domain.Picture;
import com.market.domain.User;

public interface MessageManager extends GenericManager<Message, Long> {
	
	/**
	 * This method load all messages that message type is new;
	 * @return
	 */
	@Transactional(propagation = Propagation.REQUIRED, readOnly=true)
	public List<Message> fetchAllBlogs();
	
	
	/**
	 * load all users are associated with this message
	 * @param user
	 * @return
	 */
	@Transactional(propagation = Propagation.REQUIRED,readOnly=true)
	public List<User> fetchUsers(Message message);
	
	/**
	 * load all locations are associated with this message
	 * @param user
	 * @return
	 */
	@Transactional(propagation = Propagation.REQUIRED,readOnly=true)
	public List<Location> fetchLocations(Message message);
	
	/**
	 * This method load all picture associated with this message;
	 * @param message
	 * @return
	 */	
	@Transactional(propagation = Propagation.REQUIRED, readOnly=true)
	public List<Picture> fetchPictures(Message message);
}
